From b701ecbc2c6dc57573e4508318eb3a61dc663f1d Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Tue, 27 Apr 2004 12:18:48 +0000 Subject: [PATCH] * use images from style dir * wgStyleSheetPath -> wgStylePath, wgStyleSheetPath references wgStylePath for backwards compatibility --- LocalSettings.sample | 4 ++-- config/index.php | 2 +- includes/DefaultSettings.php | 3 ++- includes/OutputPage.php | 8 ++++---- includes/Skin.php | 34 +++++++++++++++++----------------- includes/SkinPHPTal.php | 4 ++-- includes/SkinStandard.php | 10 +++++----- stylesheets/monobook/main.css | 2 +- 8 files changed, 34 insertions(+), 33 deletions(-) diff --git a/LocalSettings.sample b/LocalSettings.sample index 53d1e8b2a2..925ccbf8eb 100644 --- a/LocalSettings.sample +++ b/LocalSettings.sample @@ -59,7 +59,7 @@ $wgArticlePath = "{$wgScript}/$1"; ## Normally you don't need to change these once the above are set... # -$wgStyleSheetPath = "{$wgScriptPath}/style"; +$wgStylePath = "{$wgScriptPath}/style"; $wgStyleSheetDirectory = "{$IP}/style"; $wgUploadPath = "{$wgScriptPath}/upload"; @@ -201,4 +201,4 @@ $wgLocalInterwiki = $wgSitename; # A list of proxy servers (ips if possible) to purge on changes # don't specify ports here (80 is default) # $wgSquidServers = array('127.0.0.1'); -?> \ No newline at end of file +?> diff --git a/config/index.php b/config/index.php index 24ce16aee8..9432776295 100644 --- a/config/index.php +++ b/config/index.php @@ -703,7 +703,7 @@ if ( \$wgCommandLineMode ) { {$pretty}\$wgArticlePath = \"\$wgScript/\$1\"; {$ugly}\$wgArticlePath = \"\$wgScript?title=\$1\"; -\$wgStyleSheetPath = \"\$wgScriptPath/stylesheets\"; +\$wgStylePath = \"\$wgScriptPath/stylesheets\"; \$wgStyleSheetDirectory = \"\$IP/stylesheets\"; \$wgUploadPath = \"\$wgScriptPath/images\"; diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 135ef6472f..5a83e4cd10 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -33,7 +33,8 @@ $wgUsePathInfo = ( strpos( php_sapi_name(), "cgi" ) === false ); $wgScript = "{$wgScriptPath}/index.php"; $wgRedirectScript = "{$wgScriptPath}/redirect.php"; -$wgStyleSheetPath = "{$wgScriptPath}/style"; +$wgStylePath = "{$wgScriptPath}/style"; +$wgStyleSheetPath = &$wgStylePath; $wgStyleSheetDirectory = "{$IP}/style"; $wgArticlePath = "{$wgScript}?title=$1"; $wgUploadPath = "{$wgScriptPath}/upload"; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 86d2cbc931..6f0992670d 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -650,13 +650,13 @@ class OutputPage { array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) ); $ret .= $this->getHeadLinks(); - global $wgStyleSheetPath; + global $wgStylePath; if( $this->isPrintable() ) { $media = ""; } else { $media = "media='print'"; } - $printsheet = htmlspecialchars( "$wgStyleSheetPath/wikiprintable.css" ); + $printsheet = htmlspecialchars( "$wgStylePath/wikiprintable.css" ); $ret .= "\n"; $sk = $wgUser->getSkin(); @@ -668,7 +668,7 @@ class OutputPage { } function getHeadLinks() { - global $wgRequest, $wgStyleSheetPath; + global $wgRequest, $wgStylePath; $ret = ""; foreach ( $this->mMetatags as $tag ) { if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) { @@ -703,7 +703,7 @@ class OutputPage { $ret .= "\n"; } # FIXME: get these working - # $fix = htmlspecialchars( $wgStyleSheetPath . "/ie-png-fix.js" ); + # $fix = htmlspecialchars( $wgStylePath . "/ie-png-fix.js" ); # $ret .= ""; return $ret; } diff --git a/includes/Skin.php b/includes/Skin.php index 4399c4c6da..6c76a03f22 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -167,18 +167,18 @@ class Skin { } function getHeadScripts() { - global $wgStyleSheetPath; - $r = "\n"; + global $wgStylePath; + $r = "\n"; return $r; } function getUserStyles() { - global $wgOut, $wgStyleSheetPath; + global $wgOut, $wgStylePath; $sheet = $this->getStylesheet(); $s = "\n"; @@ -834,8 +834,8 @@ class Skin { } function getPoweredBy() { - global $wgUploadPath; - $url = htmlspecialchars( "$wgUploadPath/poweredby_mediawiki_88x31.png" ); + global $wgStylePath; + $url = htmlspecialchars( "$wgStylePath/images/poweredby_mediawiki_88x31.png" ); $img = "MediaWiki"; return $img; } @@ -1745,7 +1745,7 @@ class Skin { function makeThumbLinkObj( $img, $label = "", $align = "right", $boxwidth = 180, $framed=false ) { - global $wgUploadPath, $wgLang; + global $wgStylePath, $wgLang; # $image = Title::makeTitle( Namespace::getImage(), $name ); $url = $img->getURL(); @@ -1795,7 +1795,7 @@ class Skin { } else { $zoomicon = '
'. ''. - ''.$more.'
'; } } @@ -1875,7 +1875,7 @@ class Skin { # Enhanced RC ungrouped line function recentChangesBlockLine ( $rcObj ) { - global $wgUploadPath, $wgLang ; + global $wgStylePath, $wgLang ; # Get rc_xxxx variables extract( $rcObj->mAttribs ) ; @@ -1884,7 +1884,7 @@ class Skin { # Spacer image $r = "" ; - $r .= "" ; $r .= "" ; + $r .= "" ; $r .= "" ; if ( $rc_type == RC_MOVE ) { $r .= "  "; @@ -1939,7 +1939,7 @@ class Skin { # Enhanced RC group function recentChangesBlockGroup ( $block ) { - global $wgUploadPath, $wgLang ; + global $wgStylePath, $wgLang ; $r = "" ; $M = wfMsg( "minoreditletter" ); @@ -1973,8 +1973,8 @@ class Skin { $rcm = "RCM{$this->rcCacheIndex}" ; $toggleLink = "javascript:toggleVisibility(\"{$rci}\",\"{$rcm}\",\"{$rcl}\")" ; $arrowdir = $wgLang->isRTL() ? "l" : "r"; - $tl = "" ; - $tl .= "" ; + $tl = "" ; + $tl .= "" ; $r .= $tl ; # Main line @@ -2016,7 +2016,7 @@ class Skin { # Get rc_xxxx variables extract( $rcObj->mAttribs ); - $r .= ""; + $r .= ""; $r .= "       " ; if ( $rc_new ) $r .= $N ; else $r .= " " ; @@ -2058,7 +2058,7 @@ class Skin { # RC lines, arranges them, and outputs the HTML function recentChangesBlock () { - global $wgUploadPath ; + global $wgStylePath ; if ( count ( $this->rc_cache ) == 0 ) return "" ; $blockOut = ""; foreach ( $this->rc_cache AS $secureName => $block ) { @@ -2471,7 +2471,7 @@ class Skin { // toolbar for common editing functions. It can be disabled in the user preferences. // The necsesary JavaScript code can be found in style/wikibits.js. function getEditToolbar() { - global $wgUploadPath, $wgLang, $wgMimeType; + global $wgStylePath, $wgLang, $wgMimeType; // toolarray an array of arrays which each include the filename of // the button image (without path), the opening tag, the closing tag, @@ -2566,7 +2566,7 @@ class Skin { $toolbar.="document.writeln(\"
\");\n"; foreach($toolarray as $tool) { - $image=$wgUploadPath."/".$tool["image"]; + $image=$wgStylePath."/images/".$tool["image"]; $open=$tool["open"]; $close=$tool["close"]; $sample = addslashes( $tool["sample"] ); diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index e72a2ece49..76225b662a 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -62,7 +62,7 @@ function outputPage( &$out ) { global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut; - global $wgScript, $wgStyleSheetPath, $wgLanguageCode, $wgUseNewInterlanguage; + global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage; global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest; global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses; @@ -114,7 +114,7 @@ $tpl->set( "sysop", $wgUser->isSysop() ); */ $tpl->set( "searchaction", $this->escapeSearchLink() ); - $tpl->setRef( "stylepath", &$wgStyleSheetPath ); + $tpl->setRef( "stylepath", &$wgStylePath ); $tpl->setRef( "logopath", &$wgLogo ); $tpl->setRef( "lang", &$wgLanguageCode ); $tpl->set( "dir", $wgLang->isRTL() ? "rtl" : "ltr" ); diff --git a/includes/SkinStandard.php b/includes/SkinStandard.php index d2549a17d6..929fc3e918 100644 --- a/includes/SkinStandard.php +++ b/includes/SkinStandard.php @@ -5,31 +5,31 @@ class SkinStandard extends Skin { function getHeadScripts() { - global $wgStyleSheetPath; + global $wgStylePath; $s = parent::getHeadScripts(); if ( 3 == $this->qbSetting() ) { # Floating left $s .= "\n"; + "src='{$wgStylePath}/sticky.js'>\n"; } return $s; } function getUserStyles() { - global $wgStyleSheetPath; + global $wgStylePath; $s = parent::getUserStyles(); if ( 3 == $this->qbSetting() ) { # Floating left $s .= "\n"; + "@import '{$wgStylePath}/quickbar.css';\n\n"; } return $s; } function doGetUserStyles() { - global $wgUser, $wgOut, $wgStyleSheetPath; + global $wgUser, $wgOut, $wgStylePath; $s = parent::doGetUserStyles(); $qb = $this->qbSetting(); diff --git a/stylesheets/monobook/main.css b/stylesheets/monobook/main.css index f16d7346cd..18e95497eb 100644 --- a/stylesheets/monobook/main.css +++ b/stylesheets/monobook/main.css @@ -150,7 +150,7 @@ ul { } ol { line-height: 1.5em; - margin: 0.3em 0 0 2.4em; + margin: 0.3em 0 0 2.2em; padding:0; } ul a, ol a { -- 2.20.1